home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
pqmenu.zip
/
PQMENU.DOC
< prev
next >
Wrap
Text File
|
1992-02-22
|
5KB
|
106 lines
This menu is freeware and I claim responsibility for nothing.
So much for the legal stuff.
If your serious about programing in basic do your self a favor and get
Pro Bas. There are over 900 routines in version 5.0
I bought it about a year ago and it's fantastic. The last time I checked
5.0 was about $180 if your interested the number is 1-800-447-9120
If you don't own Pro Bas from Tera Tek, formerly Hammerly software
stop reading and go on to your next project.
There are some Pro Bas clones on BBS's this menu may or may not work
with them. It never hurts to try.
If you do own Pro Bas There is nothing more to say on the subject, just
read on.
This menu is part of a larger program that i'm working on.
I have included the source code but I warn you that I don't like to document.
So explanations are brief and hapazard.
PQMENU is designed to work like the Quick Basic menu.
You can use as many main menu items as will fit on the menu bar.
You have full controll of the placemnt of those items.
Up to 22 secondary menu items can be placed under each main menu item.
All items support a highlighted Hot Key, color of your choice.
Pull down menu windows have true shadows.
All secondary menu items can be active or inactive as you choose.
Full mouse support.
You must use the include file PQMENU.BI as this contains the TYPE
declarations used by PQMENU.
The calling syntax is
CALL MENU(PullDown(), MenuColor, frame, framecolor, textcolor, HotKeyColor, BarColor, Inactive, choice$, click%)
The Syntax is long, I would have put all the colors in a typed array but after
it was done I didn't feel like putting the effort into it. Maybe latter
if enough people want it.
-----------------------------------------------------------------------------
PullDown(): 'Can be any name you choose'
This is an array of Type ( MenuItems )
Dimention it to the number of main menu items on the menu bar.
There are 4 parts to this array
PullDown().titles The name of a single main menu element
PullDown().items all Secondary menu items seperated by a "/"
PullDown().HotKey holds position to highlight, Hot Key letter,
Weather or not item is active.
Seperate each set by a "/"
PullDown().Position The position of the main menu item
Example
REDIM PullDown(4) AS MenuItems : 4 menu items
PullDown(1).titles = "FILE" : File menu
PullDown(1).items = "OPEN/SAVE/MERGE/CREATE" :items in then file menu
PullDown(1).HotKey = "1F/2P1/1S1/1M1/1C0"
1F :1 highlight the first letter of (FILE)
:F is the Hot Key for (FILE)
2P1 :2 highlight the second letter in (OPEN)
:P is the hot key for (OPEN)
:1 indicates that this item is active
A "0" indicates that an item is inactive
etc....
If you noticed that there are only two paremeters for the
first item, it's because main menu items can not be inactive so the
last paremeter is not needed.
PullDown(1).position = 4 : Print (FILE) starting at column 4
------------------------------------------------------------------------
MenuColor Color of the menu
frame = 1 type of frame for pull down menu / same as windowmanager
framecolor = 4 color of the frame
TEXTCOLOR = 0 color of menu text
HotKeyColor = 15 color of the Hot Key
BarColor = 4 Color of the slide bar
Inactive = 8 color for inactive items
choice$ upon return holds the the choice picked in the menu
click if click = 0 then the main menu will be shown but
not active
after calling GetKey4 pass the value returned alt or lft
to click and call the menu this will activate it.
NOTE ( lft ) is ( click )in the demo
One final note, I used the variable mouse with MMCHECK and it's a shared
variable so if you want to use something else you will have to change the
source code.
Be sure to include the line CALL MMCHECK(mouse) in the
beginning of your program
I have added a special command GetKey4(mouse,asccode,scancode,lft,rgt,alt)
use this in place of GETKEY
GETKEY does not chkeck for the ALT key press
GetKey4 will check for and allow you to activate the menu by pressing
the ALT key like in Quick Basic